package com.my.aslife.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.my.aslife.module.common.ResponseResult;
import com.my.aslife.module.entity.UserDetail;
import com.my.aslife.mapper.UserDetailMapper;
import com.my.aslife.service.UserDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2022-12-12
 */
@Service
@Slf4j
public class UserDetailServiceImpl extends ServiceImpl<UserDetailMapper, UserDetail> implements UserDetailService {

    @Override
    public ResponseResult<UserDetail> queryUserDetailInfoByUID(Long uid) {

        LambdaQueryWrapper<UserDetail> lqw = new LambdaQueryWrapper<>();
        lqw.eq(UserDetail::getUid, uid);
        return ResponseResult.ok(getOne(lqw));
    }
}
